compose: Generate endian-dependent compact Compose data
authorSimon McVittie <smcv@debian.org>
Mon, 30 Aug 2021 09:13:33 +0000 (10:13 +0100)
committerSimon McVittie <smcv@debian.org>
Fri, 3 Sep 2021 07:52:36 +0000 (08:52 +0100)
commit04f697866827ea19d7315d63dc195f64d236824e
tree2bde7dc89de8c818558a198659398e5cf3cd2d0a
parent304d76af5c3988c9e40c8ebc91951e4fba5339ac
compose: Generate endian-dependent compact Compose data

The GtkComposeTable cache is always in big-endian format and is
byteswapped on load for the more common little-endian CPUs, but
init_builtin_table() in GtkIMContextSimple can't byteswap the built-in
data without copying it, which is undesirable. Pregenerate both big-
and little-endian compose data, and compile the correct flavour into
each build of GTK. This fixes failure of the composetable test when
building for a big-endian architecture such as s390x and (traditional,
big-endian) powerpc.

Bug: https://gitlab.gnome.org/GNOME/gtk/-/issues/4217
Signed-off-by: Simon McVittie <smcv@debian.org>
Forwarded: https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/3902
Applied-upstream: 4.5.0

Gbp-Pq: Name compose-Generate-endian-dependent-compact-Compose-data.patch
gtk/compose/compose-parse.c
gtk/gen-gtk-gresources-xml.py
gtk/meson.build